﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace VNet.VisiSuite.Service.Contact.Message.Item
{
    [DataContract(Namespace = VisiSuiteNamespace.Uri + "dto/ReasonCodeItem")]
    public class ReasonCodeItem
    {
        public enum ReasonCodeCategory
        {
            None = 0,
            CycleTime = 1,
            LoadUnloadTime = 2,
            SetupTime = 3,
            PartProduced = 4,
            DownTime = 5,
            ScheduledDown = 6,
            Break = 7
        }

        public enum ShopClockEventEnum
        {
            None = 0,
            In = 1,
            Out = 2
        }

        [DataMember(IsRequired = true)]
        public int ReasonCodeId { get; set; }

        [DataMember(IsRequired = true)]
        public int AreaId { get; set; }

        [DataMember(IsRequired = true)]
        public int? ParentId { get; set; }

        [DataMember(IsRequired = true)]
        public int? LinkId { get; set; }

        [DataMember(IsRequired = true)]
        public int? RollupDefinitionId { get; set; }

        [DataMember(IsRequired = true)]
        public int Level { get; set; }

        [DataMember(IsRequired = true)]
        public string Description { get; set; }

        [DataMember(IsRequired = true)]
        public bool Scrap { get; set; }

        [DataMember(IsRequired = true)]
        public string CreatedBy { get; set; }

        [DataMember(IsRequired = true)]
        public DateTime CreatedDate { get; set; }

        [DataMember(IsRequired = true)]
        public string LastUpdatedBy { get; set; }

        [DataMember(IsRequired = true)]
        public DateTime LastUpdatedDate { get; set; }

        [DataMember(IsRequired = true)]
        public bool IgnoreVisiBoxEvents { get; set; }

        [DataMember(IsRequired = true)]
        public bool HideChildren { get; set; }

        [DataMember(IsRequired = true)]
        public short? FlashDelay { get; set; }

        [DataMember(IsRequired = true)]
        public bool DisplayInDowntimeChart { get; set; }

        [DataMember(IsRequired = true)]
        public bool IgnoreInOeeCalc { get; set; }

        [DataMember(IsRequired = true)]
        public bool IgnoreInWaitingCalc { get; set; }

        [DataMember(IsRequired = true)]
        public ReasonCodeCategory Category { get; set; }

        [DataMember(IsRequired = true)]
        public ShopClockEventEnum ShopClockEvent { get; set; }

        [DataMember(IsRequired = true)]
        public byte[] TimeStamp { get; set; }
    }
}
